package org.papervision3d.objects
{
	import org.papervision3d.core.proto.DisplayObjectContainer3D;
	import org.papervision3d.materials.MaterialsList;
	import flash.display.Sprite;
	import org.papervision3d.core.Matrix3D;
	import org.papervision3d.core.proto.MaterialObject3D;
	import org.papervision3d.core.proto.CameraObject3D;
	import org.papervision3d.core.proto.TraverseCallback;
	import org.papervision3d.core.Number3D;
	
	public class DisplayObject3DProxy extends DisplayObject3D
	{
		
		public var object : DisplayObject3D;
		
		
		override public function get x():Number	{					return object.x; }
        override public function set x(value:Number):void{			object.x = value; }
        override public function get y():Number	{					return object.y; }
        override public function set y(value:Number):void{			object.y = value; }
        override public function get z():Number	{					return object.z; }
        override public function set z(value:Number):void {			object.z = value; }
    
        override public function get rotationX():Number { 			return object.rotationX; }
        override public function set rotationX(rot:Number):void { 	object.rotationX = rot; }
        override public function get rotationY():Number{ 			return object.rotationY; }
        override public function set rotationY(rot:Number):void { 	object.rotationY = rot; }
        override public function get rotationZ():Number { 			return object.rotationZ; }
        override public function set rotationZ(rot:Number):void { 	object.rotationZ = rot; }
        
        override public function set scale(scale:Number):void{ 		object.scale = scale; }
        override public function set scaleX(scale:Number):void{ 		object.scaleX = scale; }
        override public function set scaleY(scale:Number):void{ 		object.scaleY = scale; }
        override public function set scaleZ(scale:Number):void{ 		object.scaleZ = scale; }
        
        override public function set enabled ( flag : Boolean ) : void {	object.enabled = flag;}
        override public function get enabled () : Boolean {					return object.enabled;}
        
        override public function set visible( val:Boolean ) : void {					object.visible = val};
        override public function get visible():Boolean { 							return object.visible ;}
    
        override public function set name( val:String ) : void{						object.name = val};
        override public function get name():String{ 									return object.name ;}
    
    	override public function set parent( val:DisplayObjectContainer3D):void{		object.parent = val};
    	override public function get parent() : DisplayObjectContainer3D { 			return object.parent ;}
    	
        override public function set id( val :int ) : void{							object.id = val};
        override public function get id() :int{ 										return object.id ;}
    
        override public function set materials( val :MaterialsList ) :void {			object.materials = val};
        override public function get materials() :MaterialsList { 					return object.materials ;}
    	
    	override public function set Zoffset( val  : Number = 0 ) :void{				object.Zoffset = val};
    	override public function get Zoffset() : Number { 							return object.Zoffset ;}
    	
        override public function set extra( val :Object) :void{						object.extra = val};
        override public function get extra() :Object { 								return object.extra ;}
    
		override public function set container( val:Sprite):void{					object.container = val;};
		override public function get container():Sprite { 					return object.container ;}
        
        
        override public function set transform( val:Matrix3D ) : void {				object.transform = val;};
        override public function get transform():Matrix3D {					return object.transform;};
    	
    	override public function get numChildren():int{								return object.childrenTotal;}
        
        override public function set view( val:Matrix3D) : void{						object.view = val;};
        override public function get view():Matrix3D {								return object.view;};
        
		public function DisplayObject3DProxy( object : DisplayObject3D )
		{
			super();
			this.object = object;
		}
		
		
		override public function distanceTo(obj:DisplayObject3D):Number {			return object.distanceTo( obj );}
		override public function getMaterialByName(name:String):MaterialObject3D{	return object.getMaterialByName( name ) };
        override public function project(parent:DisplayObject3D, camera:CameraObject3D, callback:TraverseCallback):void{object.project(parent, camera, callback); }
        override public function moveForward(distance:Number):void {					object.moveForward(distance) ;}
        override public function moveBackward(distance:Number):void {				object.moveBackward(distance) ;}
        override public function moveLeft(distance:Number):void {					object.moveLeft(distance) ;}
        override public function moveRight(distance:Number):void {					object.moveRight(distance) ;}
        override public function moveUp(distance:Number):void {						object.moveUp(distance) ;}
        override public function moveDown(distance:Number):void {					object.moveDown(distance) ;}
        override public function translate(distance:Number, axis:Number3D):void{		object.translate(distance, axis) ;}
        override public function pitch(angle:Number):void{							object.pitch(angle) ;}
        override public function yaw(angle:Number):void{								object.yaw(angle) ;}
        override public function roll(angle:Number):void{							object.roll(angle) ;}
        override public function lookAt(targetObject:DisplayObject3D, upAxis:Number3D = null):void{		object.lookAt(targetObject, upAxis) ;}
        override public function copyPosition(reference:*):void{						object.copyPosition( reference ) ;}
        override public function copyTransform(reference:*):void{					object.copyTransform(reference) ;}
        
    	
    	override public function addChild(child:DisplayObject3D, name:String=null):DisplayObject3D{ 	return object.addChild(child, name) };
        override public function removeChild(child:DisplayObject3D):DisplayObject3D{ 					return object.removeChild(child) };
        override public function getChildByName(name:String):DisplayObject3D{ 							return object.getChildByName(name) };
        override public function removeChildByName(name:String):DisplayObject3D{ 						return object.removeChildByName(name) };
        override public function childrenList():String{ 												return object.childrenList() };
        
        public override function toString():String{							return object.toString();}
	}
}